<template>
  <div id="app-container">
    <ul>
      <li v-for="item in news">
        <nuxt-link :to="'/news/details/'+item.documentId">{{item.title}}</nuxt-link>
      </li>
    </ul>
  </div>
</template>

<script>
  import qs from 'qs'

  export default {
    name: "news",
    async asyncData({$axios}) {
      const {data} = await $axios.request({
        method: 'post',
        url: `/api/column/document/page`,
        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
        data: qs.stringify({orgId: 43, columnId: 14})
      })
      return {news: data.data.records}
    },
    // 动态数据集合
    data() {
      return {}
    },
    // 计算属性
    computed: {},
    // 监听器
    watch: {},
    // 页面组件渲染完成钩子
    mounted() {
    },
    // 方法集合
    methods: {}
  }
</script>

<style scoped lang="scss">
  #app-container {
    padding: 70px 0;

    ul {
      width: 1000px;
      margin: auto;

      li {
        padding: 5px;
      }
    }
  }
</style>
